#include "expressiontree.h"
#include "expression.h"
#include <string>

ExpressionTree::ExpressionTree(string expr)
{
    TREE t = parse(expr);
    printTree(t);

    m_expression = t.tree;
    m_constants = t.consts;
}

const vector<Operator>& ExpressionTree::expression(void)const
{
    return m_expression;
}

const vector<float>& ExpressionTree::constants(void)const
{
    return m_constants;
}
